package net.rlair.sbdemo.aspect;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.Ordered;

@Aspect
public class YangHaikunAspect1 implements Ordered{
    @Pointcut ("execution(* net.rlair.sbdemo.controller.ZhaozichenController.list())")
    public void list() {

    }

    @Before(value = "list()")
    public void before() {
        System.out.println("before list....");
    }

    @After(value = "list()")
    public void after() {
        System.out.println("after list...");
    }

    @AfterThrowing(value = "list()")
    public void afterThrowing() {
        System.out.println("after list throwing...");
    }

    @Override
    public int getOrder() {
        return 1;
    }
}
